﻿<!DOCTYPE html>
<html>
<head>
    <title>数据管理</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">


    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link href="/ViewV5/CSS/bootstrap3.3.5/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/index.css?v=1">
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/default.css">
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_533449_naak7odp5x.css" />

    <style>
        .el-button-group button {
            border-radius: 0px;
        }

        .widthmax {
            width: 100%
        }

        .pd40 {
            padding: 40px;
        }

        .pd0 {
            padding: 0;
        }
    </style>
</head>
<body class="BG">
    <div id="DATABI_DSETZZ" class="FormV">
        <el-container>
            <el-main class="elmain pd40">
                <div class="panel-df">
                    <div class="container containerb width840" style="padding:0">
                        <div class="panel panel-defaul  panhead">

                            <el-row>
                                <el-col :xs="24" :sm="24">
                                    <h4 class="text-center" style="font-size:20PX;font-weight:bolder">
                                        <span>复制数据</span>
                                    </h4>
                                    <ul class="jg-list-box " style="padding-left:10px;">
                                        <el-tree class="filter-tree"
                                                 :data="BranchListData"
                                                 :props="defaultProps"
                                                 :expand-on-click-node="iszk"
                                                 node-key="DeptCode"
                                                 default-expand-all
                                                 show-checkbox
                                                 highlight-current
                                                 ref="tree">
                                        </el-tree>
                                    </ul>
                                    <el-button type="primary" @click="onSubmit">保存</el-button>

                                </el-col>
                            </el-row>

                        </div>


                    </div>
                </div>
            </el-main>
        </el-container>

    </div>
    <script src="/ViewV5/JS/vue.js"></script>
    <script type="text/javascript" src="/ViewV5/JS/jquery-1.11.2.min.js"></script>
    <script src="/ViewV5/JS/lodash.min.js"></script>
    <script src="/ViewV5/JS/httpVueLoader.js"></script>
    <script src="/ViewV5/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="/ViewV5/JS/bijs.js?v=4"></script>
    <script>
        var app = new Vue({
            el: '#DATABI_DSETZZ',
            components: {
                'base-loading': httpVueLoader('/ViewV5/Base/Vue/Loading.vue'),
            },
            data: {
                BranchListData: [],
                defaultProps: {
                    children: 'ChildBranch',
                    label: 'DeptName'
                },
                iszk: false,
                dsetid: ComFunJS.getQueryString('dataid', '0'),
                copytype: ComFunJS.getQueryString('copytype', 'DE'),
                FormData: {

                }

            },

            methods: {
                onSubmit: function () {
                    var tempindex = this;
                    //所有选中得节点都要保存
                    var alldata =  tempindex.$refs.tree.getCheckedKeys();
                    $.getJSON("/api/Bll/ExeAction?Action=SFJS_COPYDATA", { P1: alldata.join(), P2: app.dsetid, TYPE: app.copytype },
                        function (result) {
                            if (result.ErrorMsg == "") {
                                top.ComFunJS.winsuccess("设置成功");
                            }
                    });
                }
            },
            mounted: function () {
                var pro = this;
                pro.$nextTick(function () {
                    $.getJSON('/api/Auth/ExeAction?Action=GETALLBMNEW', {}, function (resultData) {
                        app.BranchListData = resultData.Result;
                    })
                })
            },
            created() {
            },
            watch: {

            }

        })


    </script>

</body>

</html>